package com.gulimall.order.feign;

import com.gulimall.common.to.WareSkuLockTo;
import com.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author kkk
 * @date 2022/8/4
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {
    @PostMapping("/ware/waresku/stockNum")
    R getStockBySkuId(@RequestBody List<Long> skuIds);

    @PostMapping("/ware/waresku/lock/order")
    R orderLockStock(@RequestBody WareSkuLockTo wareSkuLockTo);
}
